<?php
/**
 *   Joomdiet - components/com_joomdiet/views/docviewgoogle/view.html.php
 *   Author: Juan Dapena Paz (juan@bittingbits.com)
 *   Copyright (C) 2011 Bitting Bits S.L.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
defined('_JEXEC') or die('Restricted access'); ?>
<div id="titlearea">
    <h1><?php echo $this->diet->name; ?></h1>
</div>
<div id="documentview">
    <div id="documentarea">
        <?php 
            $file_path = $this->diet->file_url;
            $file_url = JURI::base().str_replace(JPATH_BASE.'/', '', $file_path);
        ?>
        <iframe src="http://docs.google.com/gview?url=<?php echo $file_url; ?>&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
    </div>
    <div id="lateralarea">
        <div id="tools">
            <span id="downloadbutton"><a href="<?php echo $file_url; ?>">Download</a></span>
        </div>
        <div id="description">
            <h2><?php echo JText::_('COM_JOOMDIET_DESCRIPTION'); ?></h2>
            <?php echo $this->diet->description; ?>
        </div>
    </div>
    <div class="float"></div>
</div>
